package lab02.test27;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test27 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("输入整数：");
        try {
            int num1 = sc.nextInt();
            System.out.println("整数为："+num1);
        }catch (InputMismatchException e){
            System.out.println("你输入的不是整数");
            e.printStackTrace();
        }

    }
}
